package com.ourteam.product.model.domain;

import net.dao.IDataPopulateCallback;

import org.apache.commons.beanutils.BeanMap;
import org.apache.commons.lang.ArrayUtils;

import java.util.HashMap;

/**
 * Template Name : DTO数据对象
 * Template Version : 1
 * Template Last Modfiy Date : Tue Nov 07 10:29:34 IRKT 2017
 * Auto Generate Date : 2017-11-15 14:53:22
  * Warning ! This file will be overwrite when regenerate !
  *
 */
import java.util.Map;


public class ProductModelServiceParameterTemplateBean implements java.io.Serializable {
    private static Map<String, String> mappedDaoFields = new HashMap<String, String>();

    static {
        mappedDaoFields.put("id",
            com.ourteam.product.model.dao.IProductModelServiceParameterTemplateDAO.Id);

        mappedDaoFields.put("serviceTemplateItemId",
            com.ourteam.product.model.dao.IProductModelServiceParameterTemplateDAO.ServiceTemplateItemId);

        mappedDaoFields.put("parameterType",
            com.ourteam.product.model.dao.IProductModelServiceParameterTemplateDAO.ParameterType);

        mappedDaoFields.put("dataTypeId",
            com.ourteam.product.model.dao.IProductModelServiceParameterTemplateDAO.DataTypeId);

        mappedDaoFields.put("dataCheck",
            com.ourteam.product.model.dao.IProductModelServiceParameterTemplateDAO.DataCheck);

        mappedDaoFields.put("isArray",
            com.ourteam.product.model.dao.IProductModelServiceParameterTemplateDAO.IsArray);

        mappedDaoFields.put("parameterNameTemplate",
            com.ourteam.product.model.dao.IProductModelServiceParameterTemplateDAO.ParameterNameTemplate);

        mappedDaoFields.put("sortIndex",
            com.ourteam.product.model.dao.IProductModelServiceParameterTemplateDAO.SortIndex);

        mappedDaoFields.put("status",
            com.ourteam.product.model.dao.IProductModelServiceParameterTemplateDAO.Status);

        mappedDaoFields.put("remarks",
            com.ourteam.product.model.dao.IProductModelServiceParameterTemplateDAO.Remarks);

        mappedDaoFields.put("dataTypeIdExpression",
            com.ourteam.product.model.dao.IProductModelServiceParameterTemplateDAO.DataTypeIdExpression);

        mappedDaoFields.put("dataType",
            com.ourteam.product.model.dao.IProductModelServiceParameterTemplateDAO.DataType);
    }

    private com.ourteam.product.model.dao.ProductModelServiceParameterTemplate productModelServiceParameterTemplate;

    public ProductModelServiceParameterTemplateBean() {
        super();

        this.productModelServiceParameterTemplate = new com.ourteam.product.model.dao.ProductModelServiceParameterTemplate();
    }

    public ProductModelServiceParameterTemplateBean(
        com.ourteam.product.model.dao.ProductModelServiceParameterTemplate productModelServiceParameterTemplate) {
        super();

        this.productModelServiceParameterTemplate = productModelServiceParameterTemplate;
    }

    protected BeanMap getBeanMap() {
        return new BeanMap(productModelServiceParameterTemplate);
    }

    public static String getMappedDAOField(String aAttrName) {
        return mappedDaoFields.get(aAttrName);
    }

    public com.ourteam.product.model.dao.ProductModelServiceParameterTemplate convertToProductModelServiceParameterTemplate() {
        return this.productModelServiceParameterTemplate;
    }

    public com.ourteam.product.model.dao.ProductModelServiceParameterTemplate convertTo() {
        return this.productModelServiceParameterTemplate;
    }

    /**
     * Get id
     *
     * @return long
     */
    public long getId() {
        return (long) this.productModelServiceParameterTemplate.getId();
    }

    /**
     * Set id
     *
     * @parameter long
     */
    public void setId(long id) {
        this.productModelServiceParameterTemplate.setId(id);
    }

    /**
     * Get serviceTemplateItemId
     *
     * @return long
     */
    public long getServiceTemplateItemId() {
        return (long) this.productModelServiceParameterTemplate.getServiceTemplateItemId();
    }

    /**
     * Set serviceTemplateItemId
     *
     * @parameter long
     */
    public void setServiceTemplateItemId(long serviceTemplateItemId) {
        this.productModelServiceParameterTemplate.setServiceTemplateItemId(serviceTemplateItemId);
    }

    /**
     * Get parameterType
     *
     * @return String
     */
    public String getParameterType() {
        return (String) this.productModelServiceParameterTemplate.getParameterType();
    }

    /**
     * Set parameterType
     *
     * @parameter String
     */
    public void setParameterType(String parameterType) {
        this.productModelServiceParameterTemplate.setParameterType(parameterType);
    }

    /**
     * Get dataTypeId
     *
     * @return long
     */
    public long getDataTypeId() {
        return (long) this.productModelServiceParameterTemplate.getDataTypeId();
    }

    /**
     * Set dataTypeId
     *
     * @parameter long
     */
    public void setDataTypeId(long dataTypeId) {
        this.productModelServiceParameterTemplate.setDataTypeId(dataTypeId);
    }

    /**
     * Get dataCheck
     *
     * @return String
     */
    public String getDataCheck() {
        return (String) this.productModelServiceParameterTemplate.getDataCheck();
    }

    /**
     * Set dataCheck
     *
     * @parameter String
     */
    public void setDataCheck(String dataCheck) {
        this.productModelServiceParameterTemplate.setDataCheck(dataCheck);
    }

    /**
     * Get isArray
     *
     * @return String
     */
    public String getIsArray() {
        return (String) this.productModelServiceParameterTemplate.getIsArray();
    }

    /**
     * Set isArray
     *
     * @parameter String
     */
    public void setIsArray(String isArray) {
        this.productModelServiceParameterTemplate.setIsArray(isArray);
    }

    /**
     * Get parameterNameTemplate
     *
     * @return String
     */
    public String getParameterNameTemplate() {
        return (String) this.productModelServiceParameterTemplate.getParameterNameTemplate();
    }

    /**
     * Set parameterNameTemplate
     *
     * @parameter String
     */
    public void setParameterNameTemplate(String parameterNameTemplate) {
        this.productModelServiceParameterTemplate.setParameterNameTemplate(parameterNameTemplate);
    }

    /**
     * Get sortIndex
     *
     * @return int
     */
    public int getSortIndex() {
        return (int) this.productModelServiceParameterTemplate.getSortIndex();
    }

    /**
     * Set sortIndex
     *
     * @parameter int
     */
    public void setSortIndex(int sortIndex) {
        this.productModelServiceParameterTemplate.setSortIndex(sortIndex);
    }

    /**
     * Get status
     *
     * @return String
     */
    public String getStatus() {
        return (String) this.productModelServiceParameterTemplate.getStatus();
    }

    /**
     * Set status
     *
     * @parameter String
     */
    public void setStatus(String status) {
        this.productModelServiceParameterTemplate.setStatus(status);
    }

    /**
     * Get remarks
     *
     * @return String
     */
    public String getRemarks() {
        return (String) this.productModelServiceParameterTemplate.getRemarks();
    }

    /**
     * Set remarks
     *
     * @parameter String
     */
    public void setRemarks(String remarks) {
        this.productModelServiceParameterTemplate.setRemarks(remarks);
    }

    /**
     * Get dataTypeIdExpression
     *
     * @return String
     */
    public String getDataTypeIdExpression() {
        return (String) this.productModelServiceParameterTemplate.getDataTypeIdExpression();
    }

    /**
     * Set dataTypeIdExpression
     *
     * @parameter String
     */
    public void setDataTypeIdExpression(String dataTypeIdExpression) {
        this.productModelServiceParameterTemplate.setDataTypeIdExpression(dataTypeIdExpression);
    }

    /**
     * Get dataType
     *
     * @return String
     */
    public String getDataType() {
        return (String) this.productModelServiceParameterTemplate.getDataType();
    }

    public int hashCode() {
        return org.apache.commons.lang.builder.HashCodeBuilder.reflectionHashCode(this);
    }

    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        } // end if

        if ((obj instanceof ProductModelServiceParameterTemplateBean) == false) {
            return false;
        } // end if

        ProductModelServiceParameterTemplateBean other = (ProductModelServiceParameterTemplateBean) obj;

        boolean isEqual = false;

        com.ourteam.product.model.dao.ProductModelServiceParameterTemplate tempProductModelServiceParameterTemplate =
            other.convertToProductModelServiceParameterTemplate();

        if ((tempProductModelServiceParameterTemplate == null) ||
                (this.productModelServiceParameterTemplate == null)) {
            isEqual = false;
        } else if ((tempProductModelServiceParameterTemplate == this.productModelServiceParameterTemplate) ||
                tempProductModelServiceParameterTemplate.equals(
                    this.productModelServiceParameterTemplate)) {
            isEqual = true;
        } else {
            isEqual = false;
        }

        return isEqual;
    }

    public static ProductModelServiceParameterTemplateBean[] toArray(
        com.ourteam.product.model.dao.ProductModelServiceParameterTemplate[] aProductModelServiceParameterTemplates) {
        return toArray(aProductModelServiceParameterTemplates, null);
    }

    public static ProductModelServiceParameterTemplateBean[] toArray(
        com.ourteam.product.model.dao.ProductModelServiceParameterTemplate[] aProductModelServiceParameterTemplates,
        IDataPopulateCallback aCallBack) {
        if (ArrayUtils.isEmpty(aProductModelServiceParameterTemplates)) {
            return new ProductModelServiceParameterTemplateBean[0];
        }

        int length = aProductModelServiceParameterTemplates.length;

        ProductModelServiceParameterTemplateBean[] beans = new ProductModelServiceParameterTemplateBean[length];

        for (int i = 0; i < length; i++) {
            beans[i] = new ProductModelServiceParameterTemplateBean(aProductModelServiceParameterTemplates[i]);

            if (aCallBack != null) {
                aCallBack.populate(beans[i],
                    new Object[] { aProductModelServiceParameterTemplates[i] });
            }
        }

        return beans;
    }
}
